﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using ZX_3_SchoolManage_IDAL;

namespace ZX_3_SchoolManage_Factory
{
    public abstract class AbstractFactory
    {
        /// <summary>
        /// 切换数据库  静态方法
        /// </summary>
        /// <returns></returns>
        public static AbstractFactory ChangeDateBase()
        {
            //切换数据库的名字
            string DateBaseName = "SqlServer";//如果要更换数据库，请更改此变量。
            AbstractFactory fac = Assembly.Load("ZX_3_SchoolManage_Factory").CreateInstance("ZX_3_SchoolManage_Factory." + DateBaseName) as AbstractFactory;
            return fac;
        }
        public abstract TeacherManage_IDAL TeacherIDALSQL();//教师管理  抽象方法

        public abstract CourseManage_IDAL CourseTableIDAlSql();//课程表管理  抽象方法
        public abstract ClassManage_IDAL ClassManage_IDALServer();
    }
}
